﻿<%@ Page Language="C#" EnableViewState="false" AutoEventWireup="true" CodeBehind="edit.aspx.cs" Inherits="Forum.Web.Admin.templates.edit" %>

<%@ Register Assembly="Public.Control" Namespace="Public.Control" TagPrefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="../styles/dntmanager.css" rel="stylesheet" type="text/css" />
<link href="../styles/page2.css" rel="stylesheet" type="text/css" />
<style>
.ckall
{
 display:block; height:21px; padding-top:9px; cursor:pointer;
}
#apDiv1 {
	width:360px;
	height:278px;
	border: 2px solid #CCCCCC;
	background-color: #FFFFFF;
	display: inline;
}
.tu_title {
	text-align: center;
	background-color: #f1f1f1;
	font-weight: bold;
}
.tu_content {
	height: 255px;
	text-align: center;
	line-height: 255px;
}
.tu_content img {
	padding: 2px;
	border: 1px solid #CCCCCC;
	margin-top: 6%;
}
.index_bk_01 {
	border: 1px solid #CCCCCC;
	height: 22px;
	line-height: 22px;
}
</style>
</head>
<script src="../js/public.js" type="text/javascript"></script>
<script src="../js/HBDivBox.js" type="text/javascript"></script>
<body>
<div id="apDiv1" style=" display:none;">
      <div class="tu_title">本模板缩略图</div>
      <div class="tu_content"><img  id="body_tu" src="../../WebSite_Sex/images/2008103016540785_S.jpg" width="280" height="200" /></div>
    </div>
    
<form id="form1" runat="server">
<div class="ManagerForm">
		<fieldset>
		    <legend style="background:url(../images/icons/icon10.jpg) no-repeat 6px 50%;">模板列表 </legend>

        
<div class="MainDiv">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#EAE9E1">
<tr bgcolor="#F2F2F2">
    <td height="2" colspan="12" bgcolor="#CCCCCC"></td>
    </tr>




  <tr bgcolor="#F2F2F2">
    <td width="50" height="40"><strong>
      <input type="checkbox" name="checkbox" id="checkbox"   onclick="sall(this);"/>
    <label for="checkbox" style="padding:0px; margin:0px;" >全选</label>
    </strong></td>
    <td><strong>&nbsp;模板名称</strong></td>
    <td width="100" align="center"><strong>存放路径</strong></td>
    <td width="100" align="center"><strong>版权</strong></td>
    <td width="80" align="center"><strong>作者</strong></td>
    <td width="90" align="center"><strong>创建日期</strong></td>
    <td width="60" align="center"><strong>模板版本</strong></td>
    <td width="60" align="center"><strong>系统版本</strong></td>
    <td width="50" align="center"><strong>状态</strong></td>
    <td width="80" align="center"><strong>入/出库</strong></td>
    <td width="90" align="center"><strong>编辑模板</strong></td>
    <td width="90" align="center"><strong>重新生成</strong></td>
  </tr>

    <asp:Repeater ID="Repeater1" runat="server">
   <ItemTemplate>
  <tr bgcolor="#E8F4E3">
    <td height="35" align=center ><label for="Checkbox_list_<%#Eval("Templateid") %>" class="ckall"><input id="Checkbox_list_<%#Eval("Templateid") %>" value="<%#Eval("Templateid") %>" name="Checkbox_list" type="checkbox" /></label></td>
    <td  onmouseout="hideimgurl()" onmouseover="showimgtu('<%#Eval("Directory")%>');"> &nbsp;<%#Eval("Name") %></td>
    <td align="center"><%#Eval("Directory")%></td>
    <td align="center"><%#Eval("Copyright") %></td>
    <td align="center"><%#Eval("Author")%></td>
    <td align="center"><%#Eval("CreateDate")%></td>
    <td align="center"><%#Eval("Ver")%></td>
    <td align="center"><%#Eval("Fordntver")%></td>
    <td align="center"><img src="../images/state2.gif" alt="已入库" width="16" height="16" border="0" /></td>
    <td align="center">
<button type="button" class="ManagerButton" id="IntoDB" onclick="ku(0,<%#Eval("Templateid") %>,'<%#Eval("Directory")%>');" ><img src="../images/del.gif"/> 出 库 </button>
</td>
    <td align="center">
<button type="button" class="ManagerButton" id="Button4" onclick="edithtml('<%#Eval("Directory")%>');" ><img src="../images/editfile.gif"/>编辑模板</button>
</td>
    <td align="center">
<button type="button" class="ManagerButton" id="Button4" onclick="addfiles(<%#Eval("Templateid") %>,'<%#Eval("Directory")%>');" ><img src="../images/aspx.gif"/>重新生成</button>
</td>

    </tr>
    </ItemTemplate>
    </asp:Repeater>
<asp:Repeater ID="Repeater2" runat="server">
   <ItemTemplate>
  <tr>
    <td height="35" bgcolor="#FFFFFF" align=center ><label for="Checkbox_list_<%#Eval("Templateid") %>" class="ckall"><input id="Checkbox_list_<%#Eval("Templateid") %>" value="<%#Eval("Templateid") %>" name="Checkbox_list" type="checkbox" /></label></td>
    <td bgcolor="#FFFFFF"  onmouseout="hideimgurl()" onmouseover="showimgtu('<%#Eval("Directory")%>');"> &nbsp;<%#Eval("Name") %></td>
    <td bgcolor="#FFFFFF" align="center"><%#Eval("Directory")%></td>
    <td align="center" bgcolor="#FFFFFF"><%#Eval("Copyright") %></td>
    <td align="center" bgcolor="#FFFFFF"><%#Eval("Author")%></td>
    <td align="center" bgcolor="#FFFFFF"><%#Eval("CreateDate")%></td>
    <td align="center" bgcolor="#FFFFFF"><%#Eval("Ver")%></td>
    <td align="center" bgcolor="#FFFFFF"><%#Eval("Fordntver")%></td>
    <td align="center" bgcolor="#FFFFFF"><img src="../images/state3.gif" alt="未入库" width="16" height="16" border="0" /></td>
    <td align="center" bgcolor="#FFFFFF">
<button type="button" class="ManagerButton" id="IntoDB" onclick="ku(1,<%#Eval("Templateid") %>,'<%#Eval("Directory")%>');" ><img src="../images/submit.gif"/> 入 库 </button>
</td>
<td align="center" bgcolor="#FFFFFF">
<button type="button" class="ManagerButton" id="Button4" onclick="edithtml('<%#Eval("Directory")%>');" ><img src="../images/editfile.gif"/>编辑模板</button>
</td>
    <td align="center" bgcolor="#FFFFFF">&nbsp;

</td>
    </tr>    
    </ItemTemplate>
    </asp:Repeater>
</table>
<br />
<script type="text/javascript">
function edithtml(dir)
{
    window.location="edithtml.aspx?dir="+dir;
}
function ku(type_0,tid,dir)
{
    var res="";
    if(type_0==0)//出库
    {
        res=Forum.Web.Admin.templates.edit.DelTemplates(tid,dir).value;
    }
    else//入库
    {
        res=Forum.Web.Admin.templates.edit.AddTemplates(dir).value;
    }
    if(res!="")
    {
        window.location="edit.aspx";
    }
}
function addfiles(tid,dir)
{
    var res="";
    res=Forum.Web.Admin.templates.edit.AddFiles(tid,dir).value;

    if(res!="")
    {
        window.location="edit.aspx";
    }
}
function showimgtu(imgurl)
{
    var newurl="../../templates/"+imgurl+"/about.png"
    hbctl_.$("body_tu").src=newurl;
    HBDivBox.time=600000;
    HBDivBox.Show2("apDiv1");
}
function hideimgurl()
{
    HBDivBox.Remove2("apDiv1");
    hbctl_.$("body_tu").src="/";
}
function edit(id_)
{
    window.location="AddNews.aspx?id="+id_;
}
function sall(this_)
{
    if(this_.checked)
    {
        hbctl_.CheckBoxAllByName("Checkbox_list",true);
    }
    else
    {
        hbctl_.CheckBoxAllByName("Checkbox_list",false);
    }
}
</script>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="display:none;">
  <tr>
    <td  height="30" align="right">
        <cc1:Button ID="Button1" runat="server" ButtonImgUrl="../images/submit.gif" 
            Text=" 入  库 " />
&nbsp;<cc1:Button ID="Button2" runat="server" ButtonImgUrl="../images/del.gif" 
            Text=" 出  库 " />
&nbsp;<cc1:Button ID="Button3" runat="server" ButtonImgUrl="../images/state1.gif" 
            Text=" 删  除 " />
      </td>
  </tr>
</table>
		</fieldset>
        <div class="Navbutton" style="display:none;">
11111111111111111
        </div>
        </div>
</form>
</body>
</html>
